package com.jctrip.hotel.management.model.result;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@ApiModel(value = "渠道列表信息-返回值")
@Data
@Builder
public class GetAllRouteListResult {
    @ApiModelProperty(value = "渠道列表")
    private List<RouteInfo> records;

    @ApiModelProperty(value = "渠道总数")
    private Long total;

    @ApiModelProperty(value = "当前页码")
    private Long current;

    @ApiModelProperty(value = "当前页面大小")
    private Long size;

    @ApiModelProperty(value = "共几页")
    private Long pages;

    @ApiModel(value = "渠道对象")
    @Data
    @Builder
    public static class RouteInfo{
        @ApiModelProperty(value = "主键id")
        private String id;

        @ApiModelProperty(value = "渠道编号")
        private String routeCode;

        @ApiModelProperty(value = "渠道编号名")
        private String channelType;

        @ApiModelProperty(value = "渠道名称")
        private String userName;

        @ApiModelProperty(value = "渠道账户id")
        private String appId;

        @ApiModelProperty(value = "渠道账户秘钥")
        private String secretKey;

        @ApiModelProperty(value = "电话")
        private String tel;

        @ApiModelProperty(value = "邮箱")
        private String email;

        @ApiModelProperty(value = "渠道类型(0=测试；1=自有；2=外部)")
        private Integer sellerType;

        @ApiModelProperty(value = "渠道状态(0=关闭；1=正常)")
        private Integer status;

        @ApiModelProperty(value = "价格模式(0=卖价模式；1=底价模式)")
        private Integer priceType;

        @ApiModelProperty(value = "自动处理订单开关(0=关闭；1=正常)")
        private Integer autoOrderSwitch;

        @ApiModelProperty(value = "自动处理订单价格区间最低值")
        private BigDecimal autoOrderPriceMin;

        @ApiModelProperty(value = "自动处理订单价格区间最高值")
        private BigDecimal autoOrderPriceMax;

        @ApiModelProperty(value = "订单默认联系方式")
        private String defaultOrderContact;

        @ApiModelProperty(value = "第三方应用id")
        private String thirdAppId;

        @ApiModelProperty(value = "第三方应用秘钥")
        private String thirdSecret;

        @ApiModelProperty(value = "账户额度")
        private BigDecimal accountCredit;

        @ApiModelProperty(value = "账户额度预警")
        private BigDecimal minimum;

        @ApiModelProperty(value = "钉钉机器人")
        private String dingTalkRobot;

        @ApiModelProperty(value = "拓展信息(JSON格式)")
        private String extra;

        @ApiModelProperty(value = "session失效时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date loseTime;
    }
}
